package crp.core.department.app;

import crp.core.department.domain.services.DepartmentCreator;
import crp.core.department.domain.services.DepartmentSearcher;

import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.inject.Instance;
import javax.inject.Inject;

@ApplicationScoped
public class DepartmentService {
    private Instance<DepartmentCreator> creator;
    private Instance<DepartmentSearcher> searcher;

    @Inject
    public DepartmentService(Instance<DepartmentCreator> creator,
                             Instance<DepartmentSearcher> searcher) {
        this.creator = creator;
        this.searcher = searcher;
    }

    public DepartmentCreator creator() {
        return creator.get();
    }

    public DepartmentSearcher searcher() {
        return searcher.get();
    }
}
